<!DOCTYPE html>
<%@ page pageEncoding="UTF-8" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>陪玩历史列表</title>
    <base href="${pageContext.request.contextPath}/">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="css/font.css">
    <link rel="stylesheet" href="css/xadmin.css">
    <script src="../../../lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../../../js/xadmin.js"></script>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">

                <div class="layui-card-body">
                    <table class="layui-table layui-form">
                        <thead>
                        <tr style="background: #27d4c9;">
                            <th>序号</th>
                            <th>编号</th>
                            <th>昵称</th>
                            <th>图片</th>
                            <th>游戏名</th>
                            <th>陪玩时长</th>
                            <th>陪玩消费金额</th>
                        </thead>
                        <tbody>
                        <c:forEach var="order" items="${orders}" varStatus="xuan">
                        <tr>
                            <td>${xuan.count}</td>
                            <td>${order.order_id}</td>
                            <td>${order.accompanying_play_id.name}</td>
                            <td><img src="${initParam.IP}${order.accompanying_play_id.acc_img}" title="${acc_details.accompanying_play.game_id.title}"
                                     style="width: 80px;height: 60px;border-radius: 5px"></td></td>
                            <td>${order.accompanying_play_id.game_id.title}</td>
                            <td>${order.play_time}</td>
                            <td>${order.order_price}/元</td>
                        </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
                    <tr>
                        <td colspan="10" >
                            <c:if test="${page != 1}">
                                <a href="servlet/OrdersServiceAction?act=list&page=1"style="margin-left: 100px">首页</a>
                                <a href="servlet/OrdersServiceAction?act=list&page=${page-1}">上一页</a>
                            </c:if>
                            <c:if test="${page == 1}">
                                <label style="margin-left: 472px">首页</label>
                                <label>上一页</label>
                            </c:if>
                            <a>第${page}页</a>
                            <c:if test="${page != lastpage}">
                                <a href="servlet/OrdersServiceAction?act=list&page=${page+1}">下一页</a>
                                <a href="servlet/OrdersServiceAction?act=list&page=${lastpage}">尾页</a>
                            </c:if>
                            <c:if test="${page == lastpage}">
                                <label>下一页</label>
                                <label>尾页</label>
                            </c:if>
                            <form action="servlet/OrdersServiceAction?act=list" style="display: inline-block">
                                <input name="page" type="number" style="width: 30px">
                                <input type="submit" value="go">
                            </form>
                        </td>
                    </tr>
            </div>
        </div>
    </div>
</div>
</body>
<script>layui.use(['laydate', 'form'],
    function() {
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });
    });
/*用户-删除*/
function member_del(obj, id) {
    layer.confirm('确认要删除吗？',
        function(index) {
            //发异步删除数据
            $(obj).parents("tr").remove();
            layer.msg('已删除!', {
                icon: 1,
                time: 1000
            });
        });
}

</script>

</html>